﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace instantget
{
    public partial class SajatAukciokUC : UserControl
    {
        int pass;
        string user;
        public SajatAukciokUC()
        {
            InitializeComponent();
            pass = Properties.Settings.Default.aktualisJelszo;
            user = Properties.Settings.Default.aktualisUser;
        }

        private void SajatAukciok_Load(object sender, EventArgs e)
        {
            this.licittargyTableAdapter.FillByCurrentUser(instantgetDataSet.licittargy, user, pass, false);
            this.alkategoriaTableAdapter.Fill(this.instantgetDataSet.alkategoria);
        }

        private void licittargyBindingSource_CurrentChanged(object sender, EventArgs e)
        {
            int targy = ((instantgetDataSet.licittargyRow)(((DataRowView)licittargyBindingSource.Current).Row)).ta_id;
            this.LicitalokVevokTableAdapter.Fill(instantgetDataSet.LicitalokVevok, targy);
            reportViewer1.RefreshReport();
        }

        private void licittargyDataGridView_DataError(object sender, DataGridViewDataErrorEventArgs e)
        {
            //Ez az eseménykiszolgáló azért kell, hogy a DataGridViewComboBoxColumn ne dobjon hibát
        }
    }
}
